﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DocumentMakingTools.Services
{
    /// <summary>
    /// 封装处理文件相关的方法
    /// </summary>
    internal class FileService
    {
        /// <summary>
        /// 多选文件
        /// </summary>
        /// <returns>文件列表</returns>
        public static async Task<List<FileResult>> PickFiles()
        {
            try
            {
                var result = await FilePicker.Default.PickMultipleAsync();
                if (result != null)
                {
                    return result.ToList();
                }
                return null;
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
